<!-- 生成pdf文件 -->
<template>
    <div class=''>
        <n-upload :action='prefixS + "public/Upimg/upodf"' @before-upload="loading=true" :data="upload" accept=".ofd" @finish="handleFinish">
            <n-button :loading="loading">上传文件</n-button>
        </n-upload>
    </div>
</template>
<script lang='ts' setup>
import { ref, reactive } from "vue"
import { dxget, prefixS ,download} from "../util/index";
const jjbnmker = ref()
const loading = ref(false)
const handleFinish = async ({
    file,
    event
}) => {
    const data = JSON.parse(event.currentTarget.response)
    const jhjse = encodeURIComponent('https://duxinggj.com/admin#/test?ofd=' + data.data.imgurl)
    const pfds: any = await dxget("https://duxinggj.com/util/urlzpdf?url=" + jhjse)
    loading.value = false
    download(pfds.data,data.data.fileName)
};
let upload = reactive({
    typeName: "",
});
const getImgs = (data) => {
    console.log(data);
}
</script>
<style scoped></style>